// 获取路径
var pathName = window.document.location.pathname;
// 截取，得到项目名称
var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
///////////////////////////////////////////////////////////

$(document).on('click', '#button-bound', function() {
    $('.allot-bound-msk').fadeIn(400);
})
$(document).on('click', '.bound-msk-close', function() {
    $('.allot-bound-msk').fadeOut(400);
})


function addDic(currentId){
	var currentId = currentId;
	var addStr = $("#addDicStr").val();
	var url = projectName+"/wxDicAction_addDic";
	var data = {
			"currentId":currentId,
			"addStr":addStr
	}
	$.ajax({
        type : "POST",
        url : url,
        dataType : "json",
        data : data,
        success : function(flag) {
        	if(flag == 1){
        		//TODO 
        	return showDialogsucurl("操作成功!用户重新登录后生效", projectName + "/wxAdminAction_findAll.action");
       
        	}else{
        		return showDialogsucur2("添加失败或权限不足");
        	}
        	}
        });
	
	
}
